﻿using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category7
{
  public class MT740 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagDefinition U0004;
    private static SwiftTagSubItemDefinition U0005;
    private static SwiftTagDefinition U0006;
    private static SwiftTagSubItemDefinition U0007;
    private static SwiftTagDefinition U0008;
    private static SwiftTagSubItemDefinition U000E;
    private static SwiftTagSubItemDefinition U000F;
    private static SwiftTagChoiceDefinition U0010;
    private static SwiftTagDefinition U0011;
    private static SwiftTagSubItemDefinition U0012;
    private static SwiftTagSubItemDefinition U0013;
    private static SwiftTagDefinition U0014;
    private static SwiftTagSubItemDefinition U0015;
    private static SwiftTagSubItemDefinition U0016;
    private static SwiftTagDefinition U0017;
    private static SwiftTagSubItemDefinition U0018;
    private static SwiftTagSubItemDefinition U0019;
    private static SwiftTagSubItemDefinition U001A;
    private static SwiftTagDefinition U001B;
    private static SwiftTagSubItemDefinition U001C;
    private static SwiftTagSubItemDefinition U001D;
    private static SwiftTagDefinition U001E;
    private static SwiftTagSubItemDefinition U001F;
    private static SwiftTagSubItemDefinition U007F;
    private static SwiftTagDefinition U0080;
    private static SwiftTagSubItemDefinition U0081;
    private static SwiftTagDefinition U0082;
    private static SwiftTagChoiceDefinition U0083;
    private static SwiftTagDefinition U0084;
    private static SwiftTagSubItemDefinition U0086;
    private static SwiftTagSubItemDefinition U0087;
    private static SwiftTagDefinition U0088;
    private static SwiftTagSubItemDefinition U0089;
    private static SwiftTagSubItemDefinition U008A;
    private static SwiftTagDefinition U008B;
    private static SwiftTagChoiceDefinition U008C;
    private static SwiftTagDefinition U008D;
    private static SwiftTagSubItemDefinition U008E;
    private static SwiftTagSubItemDefinition U008F;
    private static SwiftTagDefinition U0090;
    private static SwiftTagSubItemDefinition U0091;
    private static SwiftTagSubItemDefinition U0092;
    private static SwiftTagDefinition U0093;
    private static SwiftTagDefinition U0094;
    private static SwiftTagDefinition U0095;
    private static SwiftTagSubItemDefinition U0096;
    private static SwiftTagDefinition U0097;
    private static SwiftTagDefinition U0098;

    [Description("Documentary Credit Number")]
    public Tag20 DocumentaryCreditNumber_20
    {
      get
      {
        return new Tag20((SwiftElement) this, 0, (SwiftDefinitionElement) MT740.U0002);
      }
    }

    [Description("Documentary Credit Number")]
    public Tag20 Tag20_DocumentaryCreditNumber
    {
      get
      {
        return this.DocumentaryCreditNumber_20;
      }
    }

    [Description("Account Identification")]
    public Tag25 AccountIdentification_25
    {
      get
      {
        return new Tag25((SwiftElement) this, 0, (SwiftDefinitionElement) MT740.U0004);
      }
    }

    [Description("Account Identification")]
    public Tag25 Tag25_AccountIdentification
    {
      get
      {
        return this.AccountIdentification_25;
      }
    }

    [Description("Applicable Rules")]
    public Tag40F ApplicableRules_40F
    {
      get
      {
        return new Tag40F((SwiftElement) this, 0, (SwiftDefinitionElement) MT740.U0006);
      }
    }

    [Description("Applicable Rules")]
    public Tag40F Tag40F_ApplicableRules
    {
      get
      {
        return this.ApplicableRules_40F;
      }
    }

    [Description("Date and Place of Expiry")]
    public Tag31D DateAndPlaceOfExpiry_31D
    {
      get
      {
        return new Tag31D((SwiftElement) this, 0, (SwiftDefinitionElement) MT740.U0008);
      }
    }

    [Description("Date and Place of Expiry")]
    public Tag31D Tag31D_DateAndPlaceOfExpiry
    {
      get
      {
        return this.DateAndPlaceOfExpiry_31D;
      }
    }

    [Description("Negotiating Bank")]
    public Tag58A NegotiatingBank_58A
    {
      get
      {
        return new Tag58A((SwiftElement) this, 0, (SwiftDefinitionElement) MT740.U0011);
      }
    }

    [Description("Negotiating Bank")]
    public Tag58A Tag58A_NegotiatingBank
    {
      get
      {
        return this.NegotiatingBank_58A;
      }
    }

    [Description("Negotiating Bank")]
    public Tag58D NegotiatingBank_58D
    {
      get
      {
        return new Tag58D((SwiftElement) this, 0, (SwiftDefinitionElement) MT740.U0014);
      }
    }

    [Description("Negotiating Bank")]
    public Tag58D Tag58D_NegotiatingBank
    {
      get
      {
        return this.NegotiatingBank_58D;
      }
    }

    [Description("Beneficiary")]
    public Tag59 Beneficiary_59
    {
      get
      {
        return new Tag59((SwiftElement) this, 0, (SwiftDefinitionElement) MT740.U0017);
      }
    }

    [Description("Beneficiary")]
    public Tag59 Tag59_Beneficiary
    {
      get
      {
        return this.Beneficiary_59;
      }
    }

    [Description("Credit Amount")]
    public Tag32B CreditAmount_32B
    {
      get
      {
        return new Tag32B((SwiftElement) this, 0, (SwiftDefinitionElement) MT740.U001B);
      }
    }

    [Description("Credit Amount")]
    public Tag32B Tag32B_CreditAmount
    {
      get
      {
        return this.CreditAmount_32B;
      }
    }

    [Description("Percentage Credit Amount Tolerance")]
    public MT740.Tag39A PercentageCreditAmountTolerance_39A
    {
      get
      {
        return new MT740.Tag39A((SwiftElement) this, 0, (SwiftDefinitionElement) MT740.U001E);
      }
    }

    [Description("Percentage Credit Amount Tolerance")]
    public MT740.Tag39A Tag39A_PercentageCreditAmountTolerance
    {
      get
      {
        return this.PercentageCreditAmountTolerance_39A;
      }
    }

    [Description("Maximum Credit Amount")]
    public Tag39B MaximumCreditAmount_39B
    {
      get
      {
        return new Tag39B((SwiftElement) this, 0, (SwiftDefinitionElement) MT740.U0080);
      }
    }

    [Description("Maximum Credit Amount")]
    public Tag39B Tag39B_MaximumCreditAmount
    {
      get
      {
        return this.MaximumCreditAmount_39B;
      }
    }

    [Description("Additional Amounts Covered")]
    public Tag39C AdditionalAmountsCovered_39C
    {
      get
      {
        return new Tag39C((SwiftElement) this, 0, (SwiftDefinitionElement) MT740.U0082);
      }
    }

    [Description("Additional Amounts Covered")]
    public Tag39C Tag39C_AdditionalAmountsCovered
    {
      get
      {
        return this.AdditionalAmountsCovered_39C;
      }
    }

    [Description("Available With By")]
    public Tag41A AvailableWithBy_41A
    {
      get
      {
        return new Tag41A((SwiftElement) this, 0, (SwiftDefinitionElement) MT740.U0084);
      }
    }

    [Description("Available With By")]
    public Tag41A Tag41A_AvailableWithBy
    {
      get
      {
        return this.AvailableWithBy_41A;
      }
    }

    [Description("Available With By")]
    public Tag41D AvailableWithBy_41D
    {
      get
      {
        return new Tag41D((SwiftElement) this, 0, (SwiftDefinitionElement) MT740.U0088);
      }
    }

    [Description("Available With By")]
    public Tag41D Tag41D_AvailableWithBy
    {
      get
      {
        return this.AvailableWithBy_41D;
      }
    }

    [Description("Drafts At")]
    public Tag42C DraftsAt_42C
    {
      get
      {
        return new Tag42C((SwiftElement) this, 0, (SwiftDefinitionElement) MT740.U008B);
      }
    }

    [Description("Drafts At")]
    public Tag42C Tag42C_DraftsAt
    {
      get
      {
        return this.DraftsAt_42C;
      }
    }

    [Description("Drawee")]
    public Tag42A Drawee_42A
    {
      get
      {
        return new Tag42A((SwiftElement) this, 0, (SwiftDefinitionElement) MT740.U008D);
      }
    }

    [Description("Drawee")]
    public Tag42A Tag42A_Drawee
    {
      get
      {
        return this.Drawee_42A;
      }
    }

    [Description("Drawee")]
    public Tag42D Drawee_42D
    {
      get
      {
        return new Tag42D((SwiftElement) this, 0, (SwiftDefinitionElement) MT740.U0090);
      }
    }

    [Description("Drawee")]
    public Tag42D Tag42D_Drawee
    {
      get
      {
        return this.Drawee_42D;
      }
    }

    [Description("Mixed Payment Details")]
    public Tag42M MixedPaymentDetails_42M
    {
      get
      {
        return new Tag42M((SwiftElement) this, 0, (SwiftDefinitionElement) MT740.U0093);
      }
    }

    [Description("Mixed Payment Details")]
    public Tag42M Tag42M_MixedPaymentDetails
    {
      get
      {
        return this.MixedPaymentDetails_42M;
      }
    }

    [Description("Deferred Payment Details")]
    public Tag42P DeferredPaymentDetails_42P
    {
      get
      {
        return new Tag42P((SwiftElement) this, 0, (SwiftDefinitionElement) MT740.U0094);
      }
    }

    [Description("Deferred Payment Details")]
    public Tag42P Tag42P_DeferredPaymentDetails
    {
      get
      {
        return this.DeferredPaymentDetails_42P;
      }
    }

    [Description("Reimbursing Banks Charges")]
    public Tag71A ReimbursingBanksCharges_71A
    {
      get
      {
        return new Tag71A((SwiftElement) this, 0, (SwiftDefinitionElement) MT740.U0095);
      }
    }

    [Description("Reimbursing Banks Charges")]
    public Tag71A Tag71A_ReimbursingBanksCharges
    {
      get
      {
        return this.ReimbursingBanksCharges_71A;
      }
    }

    [Description("Other Charges")]
    public Tag71B OtherCharges_71B
    {
      get
      {
        return new Tag71B((SwiftElement) this, 0, (SwiftDefinitionElement) MT740.U0097);
      }
    }

    [Description("Other Charges")]
    public Tag71B Tag71B_OtherCharges
    {
      get
      {
        return this.OtherCharges_71B;
      }
    }

    [Description("Sender To Receiver Information")]
    public Tag72 SenderToReceiverInformation_72
    {
      get
      {
        return new Tag72((SwiftElement) this, 0, (SwiftDefinitionElement) MT740.U0098);
      }
    }

    [Description("Sender To Receiver Information")]
    public Tag72 Tag72_SenderToReceiverInformation
    {
      get
      {
        return this.SenderToReceiverInformation_72;
      }
    }

    public MT740()
      : base(true)
    {
    }

    public MT740(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT740.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT740.MessageDefinition = new SwiftMessageDefinition("MT740", "Authorisation to Reimburse");
      MT740.U0002 = new SwiftTagDefinition("DocumentaryCreditNumber_20", "Documentary Credit Number");
      MT740.U0002.TagName = ":20:";
      MT740.U0003 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT740.U0002.Elements.Add((SwiftDefinitionElement) MT740.U0003);
      MT740.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT740.U0002);
      MT740.U0004 = new SwiftTagDefinition("AccountIdentification_25", "Account Identification");
      MT740.U0004.TagName = ":25:";
      MT740.U0004.Mandatory = false;
      MT740.U0005 = new SwiftTagSubItemDefinition("Account", "Account ");
      MT740.U0004.Elements.Add((SwiftDefinitionElement) MT740.U0005);
      MT740.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT740.U0004);
      MT740.U0006 = new SwiftTagDefinition("ApplicableRules_40F", "Applicable Rules");
      MT740.U0006.TagName = ":40F:";
      MT740.U0007 = new SwiftTagSubItemDefinition("Type", "Applicable Rules");
      MT740.U0006.Elements.Add((SwiftDefinitionElement) MT740.U0007);
      MT740.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT740.U0006);
      MT740.U0008 = new SwiftTagDefinition("DateAndPlaceOfExpiry_31D", "Date and Place of Expiry");
      MT740.U0008.TagName = ":31D:";
      MT740.U0008.Mandatory = false;
      MT740.U000E = new SwiftTagSubItemDefinition("Date", "Date");
      MT740.U0008.Elements.Add((SwiftDefinitionElement) MT740.U000E);
      MT740.U000F = new SwiftTagSubItemDefinition("Place", "Place");
      MT740.U0008.Elements.Add((SwiftDefinitionElement) MT740.U000F);
      MT740.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT740.U0008);
      MT740.U0010 = new SwiftTagChoiceDefinition("Choice", "");
      MT740.U0010.Mandatory = false;
      MT740.U0010.Multiple = true;
      MT740.U0011 = new SwiftTagDefinition("NegotiatingBank_58A", "Negotiating Bank");
      MT740.U0011.TagName = ":58A:";
      MT740.U0012 = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT740.U0012.Mandatory = false;
      MT740.U0011.Elements.Add((SwiftDefinitionElement) MT740.U0012);
      MT740.U0013 = new SwiftTagSubItemDefinition("BankIdentifierCode", "Bank Identifier Code");
      MT740.U0011.Elements.Add((SwiftDefinitionElement) MT740.U0013);
      MT740.U0010.Elements.Add((SwiftDefinitionElement) MT740.U0011);
      MT740.U0014 = new SwiftTagDefinition("NegotiatingBank_58D", "Negotiating Bank");
      MT740.U0014.TagName = ":58D:";
      MT740.U0015 = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT740.U0015.Mandatory = false;
      MT740.U0014.Elements.Add((SwiftDefinitionElement) MT740.U0015);
      MT740.U0016 = new SwiftTagSubItemDefinition("NameAndAddress", "Name And Address");
      MT740.U0014.Elements.Add((SwiftDefinitionElement) MT740.U0016);
      MT740.U0010.Elements.Add((SwiftDefinitionElement) MT740.U0014);
      MT740.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT740.U0010);
      MT740.U0017 = new SwiftTagDefinition("Beneficiary_59", "Beneficiary");
      MT740.U0017.TagName = ":59:";
      MT740.U0017.Mandatory = false;
      MT740.U0018 = new SwiftTagSubItemDefinition("Account", "Account");
      MT740.U0018.Mandatory = false;
      MT740.U0019 = new SwiftTagSubItemDefinition("Account_1", "");
      MT740.U0018.Elements.Add((SwiftDefinitionElement) MT740.U0019);
      MT740.U0017.Elements.Add((SwiftDefinitionElement) MT740.U0018);
      MT740.U001A = new SwiftTagSubItemDefinition("NameAndAddress", "Name And Address");
      MT740.U0017.Elements.Add((SwiftDefinitionElement) MT740.U001A);
      MT740.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT740.U0017);
      MT740.U001B = new SwiftTagDefinition("CreditAmount_32B", "Credit Amount");
      MT740.U001B.TagName = ":32B:";
      MT740.U001C = new SwiftTagSubItemDefinition("Currency", "Currency");
      MT740.U001B.Elements.Add((SwiftDefinitionElement) MT740.U001C);
      MT740.U001D = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT740.U001B.Elements.Add((SwiftDefinitionElement) MT740.U001D);
      MT740.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT740.U001B);
      MT740.U001E = new SwiftTagDefinition("PercentageCreditAmountTolerance_39A", "Percentage Credit Amount Tolerance");
      MT740.U001E.TagName = ":39A:";
      MT740.U001E.Mandatory = false;
      MT740.U001F = new SwiftTagSubItemDefinition("Tolerance1", "Tolerance 1");
      MT740.U001E.Elements.Add((SwiftDefinitionElement) MT740.U001F);
      MT740.U007F = new SwiftTagSubItemDefinition("Tolerance2", "Tolerance 2");
      MT740.U001E.Elements.Add((SwiftDefinitionElement) MT740.U007F);
      MT740.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT740.U001E);
      MT740.U0080 = new SwiftTagDefinition("MaximumCreditAmount_39B", "Maximum Credit Amount");
      MT740.U0080.TagName = ":39B:";
      MT740.U0080.Mandatory = false;
      MT740.U0081 = new SwiftTagSubItemDefinition("Code", "Code");
      MT740.U0080.Elements.Add((SwiftDefinitionElement) MT740.U0081);
      MT740.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT740.U0080);
      MT740.U0082 = new SwiftTagDefinition("AdditionalAmountsCovered_39C", "Additional Amounts Covered");
      MT740.U0082.TagName = ":39C:";
      MT740.U0082.Mandatory = false;
      MT740.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT740.U0082);
      MT740.U0083 = new SwiftTagChoiceDefinition("Choice", "");
      MT740.U0083.Multiple = true;
      MT740.U0084 = new SwiftTagDefinition("AvailableWithBy_41A", "Available With By");
      MT740.U0084.TagName = ":41A:";
      MT740.U0086 = new SwiftTagSubItemDefinition("BankIdentifierCode", "Bank Identifier Code");
      MT740.U0084.Elements.Add((SwiftDefinitionElement) MT740.U0086);
      MT740.U0087 = new SwiftTagSubItemDefinition("Code", "Code");
      MT740.U0084.Elements.Add((SwiftDefinitionElement) MT740.U0087);
      MT740.U0083.Elements.Add((SwiftDefinitionElement) MT740.U0084);
      MT740.U0088 = new SwiftTagDefinition("AvailableWithBy_41D", "Available With By");
      MT740.U0088.TagName = ":41D:";
      MT740.U0089 = new SwiftTagSubItemDefinition("NameAndAddress", "Name And Address");
      MT740.U0088.Elements.Add((SwiftDefinitionElement) MT740.U0089);
      MT740.U008A = new SwiftTagSubItemDefinition("Code", "Code");
      MT740.U0088.Elements.Add((SwiftDefinitionElement) MT740.U008A);
      MT740.U0083.Elements.Add((SwiftDefinitionElement) MT740.U0088);
      MT740.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT740.U0083);
      MT740.U008B = new SwiftTagDefinition("DraftsAt_42C", "Drafts At");
      MT740.U008B.TagName = ":42C:";
      MT740.U008B.Mandatory = false;
      MT740.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT740.U008B);
      MT740.U008C = new SwiftTagChoiceDefinition("Choice", "");
      MT740.U008C.Mandatory = false;
      MT740.U008C.Multiple = true;
      MT740.U008D = new SwiftTagDefinition("Drawee_42A", "Drawee");
      MT740.U008D.TagName = ":42A:";
      MT740.U008E = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT740.U008E.Mandatory = false;
      MT740.U008D.Elements.Add((SwiftDefinitionElement) MT740.U008E);
      MT740.U008F = new SwiftTagSubItemDefinition("BankIdentifierCode", "Bank Identifier Code");
      MT740.U008D.Elements.Add((SwiftDefinitionElement) MT740.U008F);
      MT740.U008C.Elements.Add((SwiftDefinitionElement) MT740.U008D);
      MT740.U0090 = new SwiftTagDefinition("Drawee_42D", "Drawee");
      MT740.U0090.TagName = ":42D:";
      MT740.U0091 = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT740.U0091.Mandatory = false;
      MT740.U0090.Elements.Add((SwiftDefinitionElement) MT740.U0091);
      MT740.U0092 = new SwiftTagSubItemDefinition("NameAndAddress", "Name And Address");
      MT740.U0090.Elements.Add((SwiftDefinitionElement) MT740.U0092);
      MT740.U008C.Elements.Add((SwiftDefinitionElement) MT740.U0090);
      MT740.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT740.U008C);
      MT740.U0093 = new SwiftTagDefinition("MixedPaymentDetails_42M", "Mixed Payment Details");
      MT740.U0093.TagName = ":42M:";
      MT740.U0093.Mandatory = false;
      MT740.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT740.U0093);
      MT740.U0094 = new SwiftTagDefinition("DeferredPaymentDetails_42P", "Deferred Payment Details");
      MT740.U0094.TagName = ":42P:";
      MT740.U0094.Mandatory = false;
      MT740.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT740.U0094);
      MT740.U0095 = new SwiftTagDefinition("ReimbursingBanksCharges_71A", "Reimbursing Banks Charges");
      MT740.U0095.TagName = ":71A:";
      MT740.U0095.Mandatory = false;
      MT740.U0096 = new SwiftTagSubItemDefinition("Code", "Code");
      MT740.U0095.Elements.Add((SwiftDefinitionElement) MT740.U0096);
      MT740.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT740.U0095);
      MT740.U0097 = new SwiftTagDefinition("OtherCharges_71B", "Other Charges");
      MT740.U0097.TagName = ":71B:";
      MT740.U0097.Mandatory = false;
      MT740.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT740.U0097);
      MT740.U0098 = new SwiftTagDefinition("SenderToReceiverInformation_72", "Sender To Receiver Information");
      MT740.U0098.TagName = ":72:";
      MT740.U0098.Mandatory = false;
      MT740.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT740.U0098);
    }

    public class Tag39A : SwiftTagWrapper
    {
      public string Value
      {
        get
        {
          return this.GetValue();
        }
        set
        {
          this.SetValue("39A", value);
        }
      }

      internal Tag39A(SwiftElement parent, int index, SwiftDefinitionElement definition)
        : base(parent, index, definition)
      {
      }
    }
  }
}
